﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SO_DataFetcher.PubFunctions
{
    public class PubLog
    {
        public static void WriteLog(string message)
        {
            WriteProcessLog(message);
        }

        /// <summary>
        /// 输出处理过程及记录
        /// </summary>
        /// <param name="line"></param>
        public static void WriteProcessLog(string line)
        {
            try
            {
                string tempLine = DateTime.Now + "  " + line + "\r\n";
                PubControls.LogRichTextBox.Text = tempLine + PubControls.LogRichTextBox.Text;
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
    }
}
